import request from "@/utils/request"


export class NewsService {
  static list = (params: any) => {
    return request.get("user/admin/news/", { params })
  }

  static delete = (ids: number[]) => {
    return request.delete("user/admin/news/", { data: { ids } })
  }
  static deleteComment = (id: number) => {
    return request.delete("user/admin/comment/", { data: { id } })
  }

  static update = (data: any) => {
    return request.put("user/admin/news/", data)
  }
  static insert = (data: any) => {
    return request.post("user/admin/news/", data)
  }

  static commentList = (params: any) => {
    return request.get("user/admin/comment/", { params })
  }
  static findNew = (id: number) => {
    return request.get("user/news/find/", { params: { id } })
  }
  static comment = (data: any) => {
    return request.post("user/add/comment/", data)
  }
}